using NUnit.Framework;
using HelpDeskTool.Extensions;

namespace HelpDeskToolTests;

[TestFixture]
public class ExtensionTests
{
	[TestCase("привет", ExpectedResult = "ghbdtn")]
	[TestCase("Comp Иванов", ExpectedResult = "compbdfyjd")]
	public string ConvertRusToLatinLowerTest(string value)
	{
		return value.ConvertRusToLatinLower();
	}

	[TestCase("00:01:00", ExpectedResult = "1 мин.")]
	[TestCase("00:00:00", ExpectedResult = "")]
	[TestCase("00:01:50", ExpectedResult = "1 мин.")]
	[TestCase("01:00:50", ExpectedResult = "1 ч.")]
	[TestCase("01:05:00", ExpectedResult = "1 ч. 5 мин.")]
	[TestCase("02:01:05:00", ExpectedResult = "2 д. 1 ч. 5 мин.")]
	[TestCase("03:00:00:00", ExpectedResult = "3 д.")]
	[TestCase("03:00:55:00", ExpectedResult = "3 д. 55 мин.")]
	[TestCase("03:12:00:45", ExpectedResult = "3 д. 12 ч.")]
	public string FormatRusTest(TimeSpan value)
	{
		return value.FormatRus();
	}
}
